<?php

namespace app\index\controller;

use think\Controller;
use think\Request;

class Base extends Controller
{
    protected $username;
    protected $userid;

    public function __construct(Request $request = null)
    {
        parent::__construct($request);

        $this->username = session('user_name');
        $this->userid = session('user_id');

        $this->assign('username', $this->username);
        $this->assign('userid', $this->userid);
    }
}
